<?php
/**
 * Created by PhpStorm.
 * User: wanghaibo
 * Date: 18/2/1
 * Time: 16:53
 */

namespace app\message\controller;


use app\message\model\MessageModel;
use cmf\controller\AdminBaseController;

class AdminMessageController extends AdminBaseController
{
    private $manager;
    /**
     * 留言列表
     * @adminMenu(
     *     'name'   => '留言管理',
     *     'parent' => 'portal/AdminIndex/default',
     *     'display'=> true,
     *     'hasView'=> true,
     *     'order'  => 10000,
     *     'icon'   => '',
     *     'remark' => '留言列表',
     *     'param'  => ''
     * )
     */
    public function index()
    {
        $this->manager = new MessageModel();
        $this->assign('messages',$this->manager->getList());
        return $this->fetch();
    }
}